<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
    <title>PetriNet</title>
    <link rel="stylesheet" type="text/css" href="css/style.css" />
    <link rel="stylesheet" type="text/css" href="css/tipsy.css" />
    <script type="text/javascript" src="js/dagre-d3.min.js"></script>
    <script src="js/d3.v4.min.js"></script>
    <script src="js/jquery-1.9.1.min.js"></script>
    <script src="js/tipsy.js"></script>
<style>
g.T4>circle {
   fill: green; 
}

g.T4>rect {
   fill: green; 
}

g.T6>circle {
   fill: brown; 
}

g.T6>rect {
   fill: brown; 
}

g.T9>circle {
   fill: red; 
}

g.T9>rect {
   fill: red; 
}

</style>
</head>
<body>
<svg width=2000 height=1400></svg>
<script type="text/javascript">
var g = new dagreD3.graphlib.Graph().setGraph({});
g.setNode('P4_0',{label:'P4_0', shape:'circle', description:'this is a source place node, it belongs thread:4', class:'T4'});
g.setNode('T0',{label:'start(4,6)', shape:'rect', description:'thread: 4, position: null', class:'T4'});
g.setEdge('P4_0', 'T0', {});
g.setNode('P4_1',{label:'P4_1', shape:'circle', description:'this is a source place node, it belongs thread:4', class:'T4'});
g.setEdge('T0', 'P4_1', {});
g.setNode('T6',{label:'start(4,9)', shape:'rect', description:'thread: 4, position: null', class:'T4'});
g.setEdge('P4_1', 'T6', {});
g.setNode('P4_2',{label:'P4_2', shape:'circle', description:'this is a source place node, it belongs thread:4', class:'T4'});
g.setEdge('T6', 'P4_2', {});
g.setNode('P9_0',{label:'P9_0', shape:'circle', description:'this is a source place node, it belongs thread:9', class:'T9'});
g.setEdge('T6', 'P9_0', {});
g.setNode('T7',{label:'acq(9,7)', shape:'rect', description:'thread: 9, position: null', class:'T9'});
g.setEdge('P9_0', 'T7', {});
g.setNode('P9_1',{label:'P9_1', shape:'circle', description:'this is a source place node, it belongs thread:9', class:'T9'});
g.setEdge('T7', 'P9_1', {});
g.setNode('T8',{label:'notify(9,7)', shape:'rect', description:'thread: 9, position: null', class:'T9'});
g.setEdge('P9_1', 'T8', {});
g.setNode('P9_2',{label:'P9_2', shape:'circle', description:'this is a source place node, it belongs thread:9', class:'T9'});
g.setEdge('T8', 'P9_2', {});
g.setNode('T9',{label:'rel(9,7)', shape:'rect', description:'thread: 9, position: null', class:'T9'});
g.setEdge('P9_2', 'T9', {});
g.setNode('P9_4',{label:'P9_4', shape:'circle', description:'this is a source place node, it belongs thread:9', class:'T9'});
g.setEdge('T9', 'P9_4', {});
g.setNode('Plock0',{label:'Plock0', shape:'circle', description:'this is a lock place node', class:'T0'});
g.setEdge('T9', 'Plock0', {});
g.setNode('T1',{label:'acq(6,7)', shape:'rect', description:'thread: 6, position: null', class:'T6'});
g.setEdge('Plock0', 'T1', {});
g.setNode('P6_1',{label:'P6_1', shape:'circle', description:'this is a selection place node, it belongs thread:6', class:'T6'});
g.setEdge('T1', 'P6_1', {});
g.setNode('T2',{label:'skip', shape:'rect', description:'thread: 6, position: null', class:'T6'});
g.setEdge('P6_1', 'T2', {});
g.setNode('P6_5',{label:'P6_5', shape:'circle', description:'this is a selection place node, it belongs thread:6', class:'T6'});
g.setEdge('T2', 'P6_5', {});
g.setNode('T11',{label:'notify(6,7)', shape:'rect', description:'thread: 6, position: null', class:'T6'});
g.setEdge('P6_5', 'T11', {});
g.setNode('P6_6',{label:'P6_6', shape:'circle', description:'this is a source place node, it belongs thread:6', class:'T6'});
g.setEdge('T11', 'P6_6', {});
g.setNode('T12',{label:'rel(6,7)', shape:'rect', description:'thread: 6, position: null', class:'T6'});
g.setEdge('P6_6', 'T12', {});
g.setNode('P6_8',{label:'P6_8', shape:'circle', description:'this is a source place node, it belongs thread:6', class:'T6'});
g.setEdge('T12', 'P6_8', {});
g.setEdge('T12', 'Plock0', {});
g.setNode('T5',{label:'compete', shape:'rect', description:'thread: 6, position: null', class:'T6'});
g.setEdge('Plock0', 'T5', {});
g.setEdge('T5', 'P6_5', {});
g.setEdge('Plock0', 'T7', {});
g.setNode('P6_7',{label:'P6_7', shape:'circle', description:'this is a source place node, it belongs thread:6', class:'T6'});
g.setEdge('T11', 'P6_7', {});
g.setNode('T3',{label:'wait(6,7)', shape:'rect', description:'thread: 6, position: null', class:'T6'});
g.setEdge('P6_1', 'T3', {});
g.setNode('P6_2',{label:'P6_2', shape:'circle', description:'this is a source place node, it belongs thread:6', class:'T6'});
g.setEdge('T3', 'P6_2', {});
g.setNode('T4',{label:'wake', shape:'rect', description:'thread: 6, position: null', class:'T6'});
g.setEdge('P6_2', 'T4', {});
g.setNode('P6_3',{label:'P6_3', shape:'circle', description:'this is a source place node, it belongs thread:6', class:'T6'});
g.setEdge('P6_3', 'T4', {});
g.setNode('P6_4',{label:'P6_4', shape:'circle', description:'this is a source place node, it belongs thread:6', class:'T6'});
g.setEdge('T4', 'P6_4', {});
g.setEdge('P6_4', 'T5', {});
g.setEdge('T3', 'Plock0', {});
g.setNode('P9_3',{label:'P9_3', shape:'circle', description:'this is a source place node, it belongs thread:9', class:'T9'});
g.setEdge('T8', 'P9_3', {});
g.setNode('T10',{label:'notify2', shape:'rect', description:'thread: 9, position: null', class:'T9'});
g.setEdge('P9_3', 'T10', {});
g.setEdge('T10', 'P6_3', {});
g.setNode('P6_0',{label:'P6_0', shape:'circle', description:'this is a source place node, it belongs thread:6', class:'T6'});
g.setEdge('T0', 'P6_0', {});
g.setEdge('P6_0', 'T1', {});
var render = new dagreD3.render();
var svg = d3.select("svg"), inner = svg.append("g");
var zoom = d3.zoom().on("zoom", function() {inner.attr("transform", d3.event.transform);});
svg.call(zoom);
var styleTooltip = function(name, description) {return "<p class='name'>" + name + "</p><p class='description'>" + description + "</p>";};
render(inner, g);
inner.selectAll("g.node")
  .attr("title", function(v) { return styleTooltip(v, g.node(v).description) })
  .each(function(v) { $(this).tipsy({ gravity: "w", opacity: 1, html: true }); });
var initialScale = 0.75;
svg.call(zoom.transform, d3.zoomIdentity.translate((svg.attr("width") - g.graph().width * initialScale) / 2, 20).scale(initialScale));
</script>
</body>
</html>
